package com.gouying.design.patterns.fly;

import java.util.HashMap;
import java.util.Map;

public class WebFactory {



    Map<String,WebSit> pool = new HashMap<String,WebSit>();


    public WebSit getWebSit(String type){
        if(pool.get(type) != null){
            return pool.get(type);
        }
        WebSit webSit = new ConWebsit(type);
        pool.put(type,webSit);
        return webSit;
    }
}
